Skip to content

fix(review): ignore suppressed check-run writes - #2419

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-issue-with-dry-run-gate-checks
Jul 1, 2026
Merged

fix(review): ignore suppressed check-run writes#2419
JSONbored merged 1 commit into
mainfrom
codex/fix-issue-with-dry-run-gate-checks

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • Non-live modes (dry-run/paused) returned synthetic successful check-run responses that downstream code treated as real published outcomes, seeding local Gate publication state and hiding missing real GitHub writes.
  • The change prevents synthetic/dry-run responses from finalizing Gate publication state so sweeps and repair logic remain correct.

Description

  • Add a dryRunSuppressed?: boolean field to the CheckRunResponse type and make publishedOutcome return null when that flag is present so suppressed writes are not treated as published outcomes.
  • Allow check-run helpers to return null (changed postNewCheckRun/finish signatures) and only finalize legacy pending Gate checks when a real published outcome exists.
  • Add a regression unit test that exercises createOrUpdateGateCheckRun in dry_run mode and asserts the write was suppressed (no network POST to /check-runs), an audit event was written, and no published outcome was returned.

Testing

  • Ran the focused unit suite with npx vitest run test/unit/github-app.test.ts test/unit/github-client.test.ts and all tests passed (108 tests total).
  • Ran type checking with npm run typecheck and it passed.
  • Attempted the full gate npm run test:ci and npm audit --audit-level=moderate but those were blocked in this environment due to network/actionlint/npm registry access issues, so full CI was not completed here.

Codex Task

@loopover-orb

loopover-orb Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-01 21:06:53 UTC

2 files · 1 AI reviewer · no blockers · readiness 86/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review

Review summary
The change correctly threads suppressed check-run writes through the check-run outcome path by marking the synthetic response and returning null instead of a published outcome. The `finish` guard also prevents legacy pending finalization when no real write occurred, which matches the stated dry-run repair-state goal. The added regression covers the main dry-run path by proving no POST is made, the audit event is recorded, and callers receive null.

Nits — 5 non-blocking
  • nit: test/unit/github-app.test.ts should also assert the persisted publication state is not written, since the PR motivation is specifically about preventing suppressed writes from seeding local publication state.
  • nit: src/github/app.ts keeps `CheckRunResponse.id` required even though `publishedOutcome` no longer reads it for suppressed responses; consider modeling the suppressed response as a discriminated union so synthetic responses do not need a fake id.
  • In test/unit/github-app.test.ts, add a focused DB assertion for the publication-state table or repository helper that previously became polluted by the synthetic dry-run outcome.
  • In src/github/app.ts, replace `CheckRunResponse` with a union such as `{ dryRunSuppressed: true } | { id: number; html_url?: string; dryRunSuppressed?: false }` to make the null-returning branch explicit.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (size label size:S; no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 67 registered-repo PR(s), 57 merged, 589 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 67 PR(s), 589 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 67 PR(s), 589 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Triage stale or unlinked PRs.
  • No action.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.80%. Comparing base (d4957ed) to head (0121d6d).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2419   +/-   ##
=======================================
  Coverage   95.80%   95.80%           
=======================================
  Files         224      224           
  Lines       24970    24971    +1     
  Branches     9075     9077    +2     
=======================================
+ Hits        23922    23923    +1     
  Misses        428      428           
  Partials      620      620           
Files with missing lines Coverage Δ
src/github/app.ts 98.00% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jul 1, 2026
@JSONbored
JSONbored merged commit 7a9413e into main Jul 1, 2026
12 checks passed
@JSONbored
JSONbored deleted the codex/fix-issue-with-dry-run-gate-checks branch July 1, 2026 22:08
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant